<{include file="public_html/header.html"}>
<{include file="public_html/left_menu.html"}>
<!--公共部分-->
    
        <link href="/static/school/css/layout.css" type="text/css" rel="stylesheet" />
    <script src="/static/public/jquery-1.11.1.min.js" type="text/javascript"></script>
    <!--私有部分-->
    <link href="/static/school/css/frame.style.css" type="text/css" rel="stylesheet" />

    <link href="/static/school/css/default.style.css" type="text/css" rel="stylesheet" />
    <link href="/static/public/layer/src/css/layui.css" rel="stylesheet">
    <script src="/static/public/layer/src/layui.js"></script>
    <script src="/static/school/js/default.common.js" type="text/javascript"></script>
<script type="text/javascript">
    var dire = 'user';
    var thumb = 'big_thumb,middle_thumb,small_thumb';
    var fileNumLimit = 1;
</script>
                    <div class="mainContainer line-all">
                        <!--star tabMainCont-->
                        <div class="line-all p20">
                            <form class="layui-form layui-form" method="post" action="<{$post_url}>" onsubmi="return false" id="form_add_video_course">
                                <input type="hidden" name="id" value="<{$info.id|default:'0'}>" />
                                <div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label">科目名称</label>
                                        <div class="layui-input-block">
                                            <input type="text" value="<{$info.name|default:''}>" name="name" placeholder="请输入标题" lay-verify="required" autocomplete="off" class="layui-input" style="width: 800px;">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label">排序</label>
                                        <div class="layui-input-block">
                                            <input type="text" value="<{$info.sort|default:0}>" name="sort" placeholder="请输入排序" lay-verify="required" autocomplete="off" class="layui-input" style="width: 300px;">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">课程分类：</label>
                                    <div class="layui-input-inline">
                                        <select name="pid" lay-verify="required" id="cate_id" placeholder="请选择" lay-filter="subject">
                                            <option value="">课程分类</option>
                                            <{foreach from=$cate item=item}>
                                                <option value="<{$item.id}>" <{if $info['pid']|default:"" eq $item.id}>selected="selected"<{/if}>><{$item.name}></option>
                                            <{/foreach}>
                                        </select>
                                    </div>
                                    <div class="layui-form-mid layui-word-aux"><{if empty($cate)}>还没有课程分类，请<a href="/course/cate_publish" class="c-52a1fa">添加课程分类</a><{/if}></div>
                                </div>
                                
                                
                                <div class="layui-form-item">
                                    <label class="layui-form-label">启用：</label>
                                    <div class="layui-input-inline">
                                        <select name="status" lay-verify="required" id="subject" placeholder="请选择" lay-filter="subject">
                                                
                                                <option <{if $info['status']|default:"" eq 0}>selected="selected"<{/if}> value="0">否</option>
                                                <option <{if $info['status']|default:"" eq 1 || !isset($info)}>selected="selected"<{/if}> value="1">是</option>
            							</select>
                                    </div>
                                </div>
                                
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">分类介绍：</label>
                                    <div class="layui-input-block">
                                        <textarea name="content" placeholder="请输入分类介绍" class="layui-textarea"><{$info.content|default:''}></textarea>
                                    </div>
                                </div>
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                </div>
                            </form>
                            <!--end tabMainCont-->
                        </div>

                    </div>
                </div>
                <!--end内容区域-->
                <script type="text/javascript" src="/static/public/webupload/webuploader.js"></script>
                <script type="text/javascript" src="/static/public/webupload/upload.js"></script>
                <script type="text/javascript" src="/static/public/webupload/upload_for_school.js"></script>
                <script src="/static/manage/js/common.js"></script>
                <script>
                    layui.use('laydate', function() {
                        var laydate = layui.laydate;

                        var start = {
                            min: laydate.now(-30),
                            max: laydate.now(+365),
                            istoday: false,
                            choose: function(datas) {
                                end.min = datas; //开始日选好后，重置结束日的最小日期
                                end.start = datas //将结束日的初始值设定为开始日
                            }
                        };

                        var end = {
                            min: laydate.now(),
                            max: laydate.now(+365),
                            istoday: false,
                            choose: function(datas) {
                                start.max = datas; //结束日选好后，重置开始日的最大日期
                            }
                        };

                        document.getElementById('LAY_demorange_s').onclick = function() {
                            start.elem = this;
                            laydate(start);
                        }
                        document.getElementById('LAY_demorange_e').onclick = function() {
                            end.elem = this
                            laydate(end);
                        }

                    });
                </script>
